#include<QString>
#include<qgisinterface.h>
#include <qgisplugin.h>
#include "myplugin.h"

static  QString sName = "my plugin";
static  QString sDescription = "plugin test";
static  QString sCategory = "Layers";
static  QString sPluginVersion = "Version 1.0";
static  int sPluginType = QgisPlugin::UI;
static  QString sPluginIcon = "";

//插件创建
 QGISEXTERN QgisPlugin * classFactory(QgisInterface * theQgisInterfacePointer)
{
    return new MyPlugin(theQgisInterfacePointer, sName, sDescription, sCategory, sPluginVersion, QgisPlugin::UI);
}

 QGISEXTERN QString* name()
{
     return &sName;
}


QGISEXTERN QString* description()
{
     return &sDescription;
}


QGISEXTERN QString* category()
{
    return &sCategory;
}

QGISEXTERN int type()
{
    return sPluginType;
}

QGISEXTERN QString* version()
{
    return &sPluginVersion;
}

QGISEXTERN QString* icon()
{
    return &sPluginIcon;
}

QGISEXTERN void unload(QgisPlugin * thePluginPointer)
{
    delete thePluginPointer;
}
